# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=ksystemlog
pkgver=24.02.2
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/ksystemlog/"
pkgdesc="KDE SystemLog Application"
license="GPL-2.0-or-later AND BSD-3-Clause"
depends_dev="
	audit-dev
	karchive-dev
	kcompletion-dev
	kconfig-dev
	kcoreaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kitemviews-dev
	ktextwidgets-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	qt6-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang $pkgname-doc"
_repo_url="https://invent.kde.org/system/ksystemlog.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ksystemlog-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f6aaf1ac7149ed141718132fa0c5971b230d07aceadc0eb20fb2ae4d2327ed0ec92431aabf1c85a6e42090cc420f268d6858fe642adf0d069cb43530263eb1e3  ksystemlog-24.02.2.tar.xz
"
